#include"EpollServer.hpp"
#include<iostream>
#include<string>
#include<memory>

void Usage(std::string process)
{
    std::cerr<<"Usage: "<<process<<" port"<<std::endl;
}

int main(int argc,char *argv[])
{
    if(argc!=2)
    {
        Usage(argv[0]);
        return 1;
    }
    int port=std::stoi(argv[1]);
    std::unique_ptr<EpollServer> server=std::make_unique<EpollServer>(port);
    server->InitSrever();
    server->Loop();
    return 0;
}